package com.myapp.struts.menu;

import com.myapp.struts.menu.Constants;
import java.util.ArrayList;

public class GBAllDayHTML {

    private static GBAllDayHTML gbAllDayHTMLObj;
    ArrayList<FoodItems> gbAllDayHTMLArray = new ArrayList<FoodItems>();

    public static synchronized GBAllDayHTML getSingletonObject() {
        if (gbAllDayHTMLObj == null) {
            gbAllDayHTMLObj = new GBAllDayHTML();
        }
        return gbAllDayHTMLObj;
    }

    public Object clone() throws CloneNotSupportedException {
        throw new CloneNotSupportedException();
    }

    public String getGBAllDayHTML(String fileLoc) {
        String fileName = "";

        MenuRead menuReadObj = new MenuRead();
        gbAllDayHTMLArray = menuReadObj.ReadMenu(Constants.GREAT_BRITAN);
        
        MenuGenerate menuGenerateObj = new MenuGenerate();
        gbAllDayHTMLArray = menuGenerateObj.GenerateMenu(gbAllDayHTMLArray, Constants.ALL_DAY);

        MenuFormat menuFormatObj = new MenuFormat();
        fileName = menuFormatObj.FormatMenu(gbAllDayHTMLArray, Constants.HTML, fileLoc);
        return fileName;
    }
}
